#include "Train.h"

class Solution {
public:
    int missingNumber(vector<int>& nums) {
        int ret = 0;
        for (int i = 1; i <= nums.size(); i++) ret ^= i;
        for (auto x : nums)
        {
            ret ^= x;
        }
        return ret;
    }
};